<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<script type="text/javascript" src="${ctx}/js/system/user/edit.js"></script>

<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}
</style>
<div class="general">
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/user/editEntity.shtml">
		<input type="hidden" class="form-control checkacc" value="${user.id}"
			name="userFormMap.id" id="id">
		<section class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-3 control-label">用户名</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" placeholder="请输入用户名"
							value="${user.userName}" name="userFormMap.userName"
							id="userName">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">账号</label>
					<div class="col-sm-9">
						<input type="text" class="form-control checkacc"
							placeholder="请输入账号" value="${user.accountName}"
							name="userFormMap.accountName" id="accountName"
							readonly="readonly">
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>

				<header class="panel-heading">
					<div class="doc-buttons" style="float: right;">
						所属上级： <select id="parent" name="userFormMap.parentId"
							class="form-control m-b">
							<c:forEach items="${userlist}" var="key">
								<c:choose>
									<c:when test="${user.parentId==key.id}">
										<option value="${key.id} " selected="selected">${key.userName}</option>

									</c:when>
									<c:when test="${user.id==key.id}">
									</c:when>
									<c:otherwise>
										<option value="${key.id}">${key.userName}</option>
									</c:otherwise>
								</c:choose>
							</c:forEach>
						</select>
					</div>
				</header>


				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group" id="selGroup" data-url="/role/selRole.shtml?roleFormMap.userId=${user.id}"></div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">是否禁用</label>
					<div class="col-sm-9">
						<div class="btn-group m-r">
							<button data-toggle="dropdown"
								class="btn btn-sm btn-default dropdown-toggle">
								<span class="dropdown-label"><c:if
										test="${user.locked eq 1}">是</c:if> <c:if
										test="${user.locked eq 0}">否</c:if></span> <span class="caret"></span>
							</button>
							<ul class="dropdown-menu dropdown-select">
								<li class="active"><a href="#"><input type="radio"
										name="userFormMap.locked" value="1"
										<c:if test="${user.locked eq 1}"> checked="checked"</c:if>>否</a></li>
								<li class=""><a href="#"><input type="radio"
										name="userFormMap.locked" value="0"
										<c:if test="${user.locked eq 0}"> checked="checked"</c:if>>是</a></li>
							</ul>
						</div>
					</div>
				</div>
				<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label">描述</label>
					<div class="col-sm-9">
						<input type="text" class="form-control" placeholder="请输入账号描述"
							value="${user.description}" name="userFormMap.description"
							id="description">
					</div>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<button type="submit" class="btn btn-success btn-s-xs">保存</button>
			</footer>
		</section>
	</form>
</div>

<script type="text/javascript">
	onloadurl();
</script>
<script type="text/javascript" src="${ctx}/notebook/notebook_files/bootstrap-filestyle.min.js"></script>